# -*- coding:utf8 -*-
from django.conf.urls import url
from wanbatvapp.utils import re
from wanpuzzle.bengbengtiao import views

__author__ = 'Forcs'

urlpatterns = [
    # 用户接口 start
    # 用户登录接口
    url(r'^user/login$', views.login),
    # 切换用户接口
    url(r'^user/switch/(?P<stb_id>'+re.STB_ID+')$', views.switch_user),
    # 获取用户节目列表接口
    url(r'^user/programs/(?P<stb_id>'+re.STB_ID+')$', views.get_program_list),
    # 获取用户付费节目列表接口
    url(r'^user/newprograms/(?P<stb_id>'+re.STB_ID+')$', views.get_pay_program_list),
    # 获取用户收藏节目列表接口
    url(r'^user/favorite/(?P<stb_id>'+re.STB_ID+')$', views.get_favorite),
    # 获取用户已购买节目列表接口
    url(r'^user/pay/(?P<stb_id>'+re.STB_ID+')$', views.get_payed),
    # 获取用户数据接口
    url(r'^user/data/(?P<stb_id>'+re.STB_ID+')$', views.get_user_data),
    # 用户解锁节目接口
    url(r'^user/unlock/(?P<stb_id>'+re.STB_ID+')$', views.unlock_programs),
    # 用户解锁单个节目接口
    url(r'^user/unlock/(?P<stb_id>'+re.STB_ID+')/(?P<program_token>'+re.TOKEN+')$', views.unlock_program),
    # 用户判断节目是否解锁借口
    url(r'^user/checkunlocked/(?P<stb_id>'+re.STB_ID+')/(?P<program_token>'+re.TOKEN+')$', views.is_unlocked),
    # 用户判断节目是否付费接口
    url(r'^user/checkpay/(?P<stb_id>' + re.STB_ID + ')/(?P<program_token>' + re.TOKEN + ')$', views.is_pay),
    # 用户获取随机节目接口
    url(r'^user/random/(?P<stb_id>'+re.STB_ID+')$', views.get_random_program),
    # 用户接口 end

    # 推送通知接口 start
    # 通知用户绑定接口
    url(r'^notify/user/bind$', views.binds_weixin_user_data),
    # 通知宝贝空间添加媒体内容接口
    url(r'^notify/baby/add$', views.add_weixin_user_media),
    # 通知宝贝空间添加已购买内容接口
    url(r'^notify/payedprogram$', views.notify_payed_program),
    # 推送通知接口 end

    # 宝贝空间接口 start
    # 节目喜欢接口
    url(r'^baby/shared/checklike$', views.is_like),
    # 分享我的宝贝接口
    url(r'^baby/shared/(?P<stb_id>'+re.STB_ID+')$', views.shared_user_picture),
    # 获取宝贝空间内容列表接口
    url(r'^baby/shareds$', views.get_shared_list),
    # 点赞接口
    url(r'^baby/shared/like$', views.like_shared),
    # 获取节目点赞用户列表
    url(r'^baby/shared/likeusers', views.get_like_users),
    # 取消点赞接口
    url(r'^baby/shared/unlike$', views.unlike_shared),
    # 获取我的宝贝内容列表接口
    url(r'^baby/user/(?P<stb_id>\S+)$', views.get_baby_self_list),
    # 删除我的宝贝接口
    url(r'^baby/delete/(?P<stb_id>'+re.STB_ID+')$', views.delete_baby),
    # 管理员删除我的宝贝
    url(r'^baby/admin/delete/(?P<itemid>\w+)$', views.admin_delete_baby),
    # 管理员恢复我的宝贝
    url(r'^baby/admin/recovery/(?P<itemid>\w+)$', views.admin_recovery_baby),
    # 获取已下架的我的宝贝内容列表
    url(r'^baby/shareds/deleted$', views.get_shared_list_deleted),
    # 宝贝空间接口 end

    # 节目接口 start
    # 获取节目播放地址接口
    url(r'^program/(?P<program_token>'+re.TOKEN+')$', views.get_program),
    # 收藏节目接口
    url(r'^program/collect/(?P<program_token>'+re.TOKEN+')$', views.collect_program),
    # 取消节目收藏接口
    url(r'^program/uncollect/(?P<program_token>'+re.TOKEN+')$', views.uncollect_program),
    # 节目获取星星接口
    url(r'^program/rating/(?P<program_token>'+re.TOKEN+')$', views.rating_program),
    # 节目同步接口
    url(r'^program/sync/(?P<program_token>'+re.TOKEN+')$', views.sync_program),
    # 预加载节目内容接口
    url(r'^program/check$', views.pre_load_data),
    # 获取节目付费信息接口
    url(r'^program/getsubject/(?P<program_token>'+re.TOKEN+')$', views.get_subject),
    # 节目接口 end

    # 活动接口 start
    # 获取活动信息
    url(r'^activity/get$', views.activity_get),
    # 获取活动视频列表
    url(r'^activity/shareds$', views.get_shared_list_activity),
    # 获取活动视频列表默认页
    url(r'^activity/programs$', views.activity_new_programs),
    # 获取活动视频列表页
    url(r'^activity/programs/(?P<page>\d+)$', views.activity_new_programs),
    # 获取热门视频
    url(r'^activity/hot$', views.activity_top10),
    # 活动点赞
    url(r'^activity/like$', views.activity_like),
    # 获取二维码接口
    url(r'^qrcode$', views.get_qrcode),
    # 初始化接口
    url(r'^activity/init$', views.activity_init),
    # 活动相框
    url(r'^activity/imgframe$', views.get_photo_frame),
    # 活动接口 end


]
